//
//  AppDelegate.h
//  Speedater
//
//  Created by NgoThang on 12/28/11.
//  Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#include <AudioToolbox/AudioToolbox.h>
#import "AppCLLocation.h"

@interface AppDelegate : UIResponder <UIApplicationDelegate>
{
    UITabBarController *tabBarController;
    
    UIBackgroundTaskIdentifier bgTask;
    UIAlertView *notifyMessage;
    NSTimer *notify;
    NSMutableData *responseData;
    BOOL hasIn;
}

@property (strong, nonatomic) UIWindow *window;
@property (nonatomic, retain) UITabBarController *tabBarController;
@property (nonatomic, retain) AppCLLocation *appCLL;

@property (nonatomic) float lat, lon;

- (void)updateNotify;
- (void)updateGPS;

- (void) playAlarm;
- (void) playCat;
- (void) playTiger;

+ (void)updateTabBarItem:(UITabBar *)tabBar withMailValue:(NSInteger)mailValue andUpdateMute:(BOOL)isUpdateMute;
+ (void)saveState:(NSInteger)tabBarIndex withViewController:(UIViewController *)currentViewController;
+ (NSString *)encodeText:(NSString *)string;
+ (NSString *)decodeText:(NSString *)string;

@end
